html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

* {
    padding: 0;
    border: 0;
    box-sizing: border-box;
}

body {
    margin: 0px;
}

.Body {
    padding: 90px 0px 0px 0px;
}

.Body h1{
    text-align:left;
    color:#006699;
    font-family:Arial;
    margin: 50px 0 50px 30px;
}

.Body h2 {
        text-align: center;
        font-family: Arial;
        color: #00A4F7;
        padding-top: 10px;
    }

    .Body h3 {
        font-family: Arial;
        text-align: center;
        padding: 20px;
        color: #00A4F7;
    }

.Body p{
    font-size: medium;
}

.Body a {
    text-decoration: none;
}

.photo {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
}

.Ltext {
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 20px;
    box-sizing: border-box;
    margin-bottom: 30px;
}

img {
    max-width: 100%; /* Make sure the image is responsive */
    
}

.P1, .P2, .P3, .P4 {
    display: flex;
    min-height: 450px;
    width: calc(100% - 40px);
    margin: 20px;
    background-position: top 50px;
    background-size: cover;
    background-repeat: no-repeat;
}

.P1 {
    background: url("../Pictures/F_iimage.png") no-repeat center;
    background-size: cover;
    margin: 20px 0 0 0;
}

.P2 {
    background: url("../Pictures/1.jpg") no-repeat center;
    background-size: cover;
}

.P3 {
    background: url("../Pictures/2.jpg") no-repeat center;
    background-size: cover;
}

.P4 {
    background: url("../Pictures/3.jpg") no-repeat center;
    background-size: cover;
}

.Ltext h2 {
    font-family: Arial;
    color: white;
    text-align:left;
    padding:0px 0px 30px 20px;
}

.info {
    background: white;
    padding: 30px;
    justify-content: center; /* Center horizontally */
    align-items: center;
}

.infoM {
    box-sizing: border-box;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Use a single value */
}

    .infoM li {
        font-family: Arial;
        font-size: medium;
    }

.M1, .M2, .M3, .M4, .M5, .M6, .M7, .M8, .M9, .M10, .M11, .M12, .M13, .M14 {
    flex: 3 1 31%; /* Adjusts size */
    margin: 15px;
    padding: 20px;
    display: flex; /* To enable centering */
    justify-content: center; /* Center items horizontally */
    align-items: center; /* Center items vertically */
    width: 175px;
    height: 300px;
    box-shadow: 5px 5px 10px lightblue;
    border-radius: 25px;
    transition: box-shadow linear 0.5s;
    transition: background-color linear 0.5s;
}

.M1:hover, .M2:hover, .M3:hover, .M4:hover, .M5:hover, .M6:hover, .M7:hover, .M8:hover, .M9:hover, .M10:hover, .M11:hover, .M12:hover, .M13:hover, .M14:hover {
        box-shadow: 10px 10px 10px lightblue;
        background-color: #8ceded;
    }

.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
    background-color: #fff;
    margin: 15% auto; /* Centered */
    padding: 20px;
    border: 1px solid #888;
    width: 100%; /* Could be more or less, depending on screen size */
    max-width: 1000px;
    max-height: auto;
    border-radius: 25px;
}

/* Close Button */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

    .close:hover, .close:focus {
        color: black;
        text-decoration: none;
        cursor: pointer;
    }

.M_image {
    max-width: 50%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.3s ease-in-out;
}

a:hover .M_image {
    transform: scale(1.2);
}

/* Show modal when target is matched */
.modal:target {
    display: block; /* Show the modal */
}

.Modal_Info img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.Modal_UL {
    padding:0px 35px;
}

/* Media Query for Mobile Devices */
@media (max-width: 768px) {
    .M1, .M2, .M3, .M4, .M5, .M6, .M7, .M8, .M9 {
        margin: 30px;
    }
        .modal-content {
        width: 90%; /* Width for mobile devices */
        margin: 40% auto; /* Adjust top margin for better centering */
    }

    .infoM {
        padding: 0;
    }

    .Body h2 {
        padding: 0 5px;
    }

    .Body h3{
        padding:10px;
    }
}